﻿using CommunityToolkit.Mvvm.ComponentModel;
using Company.Database.Entities;
using Company.Shell.Interfaces;


namespace Company.Shell.Services
{
    public class Session :ObservableObject, ISession
    {
        private UserEntity UserEntity = new();
        /// <summary>
        /// 当前登录用户 
        /// </summary>
        public UserEntity CurrentUser
        {
            get => UserEntity;
            private set => SetProperty(ref UserEntity, value);
        }

        public void Add(UserEntity user)
        {
            CurrentUser= user;
        }
    }
}
